//
//  FSDispatchCell.m
//  WZSOA
//
//  Created by 刘沿 on 16/6/7.
//  Copyright © 2016年 刘沿. All rights reserved.
//

#import "FSDispatchCell.h"

@implementation FSDispatchCell

+(instancetype)cellWihtTableView:(UITableView*)tableView{
    NSString * cellIdentifier = @"CellId";
    FSDispatchCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    return cell;
    
}

-(void)setAllString:(NSString *)allString{
    _allString = allString;
    
    NSArray * tempArray = [allString componentsSeparatedByString:@"##"];
    self.titleLabel.text = [NSString stringWithFormat:@"%@:",tempArray.firstObject];
    if ([tempArray.lastObject isEqualToString:@"null"]) {
        self.desLabel.text = @"";
    }else{
        self.desLabel.text = tempArray.lastObject;
    }
    
}

-(void)editStatus:(BOOL)editor{ //编辑;
    
    
    if (editor) {
        self.isEditor = YES;
        if ([self.titleLabel.text rangeOfString:self.detailModel.setp].location != NSNotFound ) {
            self.textView.hidden = NO;
        }else{
            self.textView.hidden = YES;
        }
        
//            self.textView.hidden = NO;

    }else{
        self.isEditor = NO;
        self.textView.hidden = YES;
    }
}

@end
